<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>修改标签</title>
 <link href="css/table.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
 <script type="text/javascript" src="js/openwindow.js"></script>
 <script type="text/javascript">
function saveMark(){
	var name =$("#name").val();
	var description =$("#description").val();
	if($.trim(name)=='null' ||$.trim(name)==''){
		alert("标签名称不能为空！");
		return;
	}
	if($.trim(description)=='null' || $.trim(description)==''){
		alert("标签说明不能为空！");
		return;
	}
	$.post("updateBookMark.action",$("form").serialize(),function(data){
			if(data=='success'){
				alert("操作成功！");
				window.close();
				window.opener.location.href="bookMarkList.action";
			}else{
				alert("操作失败！");
			}
		});	
	
}	
 </script>
</head>
<body>
<table align="center" border="0" cellpadding="0" cellspacing="0" width="98%">
  <tbody>
  <tr>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
    <td style="background: url('image/wsoa_window_002.gif');"><table border="0" cellpadding="0" cellspacing="0">
      <tbody><tr>
        <td align="center" style="background: url('image/wsoa_window_002.gif');" width="10"><img src="image/center_19.gif"></td>
        <td align="center" style="background: url('image/wsoa_window_002.gif');"></td>
        <td></td>
        </tr>
    </tbody>
    </table></td>
    <td style="background: url('image/wsoa_window_002.gif');" width="1"></td>
  </tr>
  <tr>
    <td style="background: url('image/wsoa_window_010.gif');"  width="1">&nbsp;</td>
    <td>
    <input type="hidden" id="array" >
    <form action="" method="post" name="saveMemoForm" id="saveMemoForm">
    	<input type="hidden" name="bookMark.bookmarkid" value="${bookMark.bookmarkid}">
    <table width="100%" style="margin-top: 10px" class="table5 bgcolor5">
    	<tr><td  class="table5 bgcolor5" width="30%">标签名称</td>
    	<td class="table5"  >
    		<input name="bookMark.bookmarkname" id="name" type="text" size="45" maxlength="15" value="${bookMark.bookmarkname }"/>
    	</td></tr>
    	<tr><td class="table5 bgcolor5">标签说明</td>
    	<td class="table5">
    	<input type="text" id="description" name="bookMark.bookmarkdesc" size="45" value="${bookMark.bookmarkdesc}" maxlength="50">
    	</td></tr>
    	<tr><td class="table5 bgcolor5">标签备注</td>
    	<td class="table5" >
    		<textarea id="content" onkeyup="textLength(this,100)" title="最多不超过100个字符" name="bookMark.bookmarktext" style="width: 95%;height: 50px">${bookMark.bookmarktext}</textarea>
    	 </td></tr>
    	<tr>
    	<td align="center" colspan="2">
    	<input onclick="saveMark()" class="button_02" value="保存" type="button" >
    	&nbsp;<input class="button_02" type="button" value="退出" onclick="window.close()" > 
    	</td></tr>
    </table>
    </form>
    </td>
<td style="background: url('image/wsoa_window_006.gif');"  width="1">&nbsp;</td></tr>
  <tr>
    <td height="1" width="1"><img src="image/wsoa_window_009.gif" height="16" width="14"></td>
    <td style="background: url('image/wsoa_window_008.gif');" height="1"></td>
    <td height="1" width="1"><img src="image/wsoa_window_007.gif" height="16" width="12"></td>
  </tr>
</tbody>
</table>
</body>
</html>